/**
 * Copyright (c) 2014-2015, Suredy technology Co., Ltd. All rights reserved.
 * @author ZhangMaoren 
 * @since 2015年4月27日
 * @version 0.1
 */
package com.suredy.base.model;


/**
 * @author ZhangMaoren
 *
 */
public enum Action {
	Access(1);//, Modification(2), Grant(3);
	
	private final Integer action;

	public static Action parse(Integer value) {
		Action ret = null;
		switch (value) {
		case 1:
			ret = Access;
			break;
//		case 2:
//			ret = Modification;
//			break;
//		case 3:
//			ret = Grant;
//			break;
		default:
			break;
		}
		return ret;
	}
	
	Action(Integer value) {
		this.action = value;
	}

	public Integer getAction() {
		return action;
	}

	public String getDescription() {
		String ret = null;
		switch (this.action) {
		case 1:
			ret = "授权/访问";
			break;
//		case 2:
//			ret = "写入/修改";
//			break;
//		case 3:
//			ret = "完全控制";
//			break;

		default:
			break;
		}
		return ret;
	}
}
